/**
 * 
 */
package org.aman.sprmvc.action;

import org.aman.sprmvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Copyright: 本内容仅限于重庆爱赢科技有限公司内部使用，禁止转发. 
 * @Author: daijiangguo 2014-6-9 下午6:21:04 
 * @Version: $Id$
 * @Desc: <p></p>
 */
@Controller
public class TestAction {
    @RequestMapping(value = "/test.do")
    public String test(){
        System.out.println("test");
        return "test";
    }
    
    @ResponseBody
    @RequestMapping(value = "/test1")
    public String test1(){
        System.out.println("test1");
        return "test1";
    }
    
    @ResponseBody
    @RequestMapping(value = "/test2")
    public Object test2(){
        System.out.println("test2");
        return "test2";
    }
    
    @ResponseBody
    @RequestMapping(value = "/test3")
    public Object test3(){
        System.out.println("test3");
        return new User("100","aman");
    }

    @RequestMapping(value = "/test4")
    public Object test4(){
        System.out.println("test4");
        return new ModelAndView();
    }
}
